class A{

}
class B extends A{

}
class C extends A{

}

public class TestDemo {
    public static void main(String[] args) {
        A a = new A();
        A a2 = new B();//向上转型
        A a3 = new C();
    }
}
